API: Add a STRAIGHT_JOIN to list=logevents on Domas's request. Also make an implicit...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 20 Feb 2009 21:18:07 +0000 (21:18 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 20 Feb 2009 21:18:07 +0000 (21:18 +0000)
includes/api/ApiQueryLogEvents.php

index 6f6e39a..5d491fc 100644 (file)
@@ -59,12 +59,14 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        $this->addWhere($hideLogs);
 
                // Order is significant here
-               $this->addTables(array('user', 'page', 'logging'));
+               $this->addTables(array('logging', 'user', 'page'));
+               $this->addOption('STRAIGHT_JOIN');
                $this->addJoinConds(array(
+                       'user' => array('JOIN',
+                               'user_id=log_user'),
                        'page' => array('LEFT JOIN',
                                array(  'log_namespace=page_namespace',
                                        'log_title=page_title'))));
-               $this->addWhere('user_id=log_user');
                $index = 'times'; // default, may change
 
                $this->addFields(array (